package com.hexb.smh.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * @author : hexb
 * 不解密的原始记录实体类,以String存储价格
 * 所有成本价格相关均加密
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ProductRaw extends Product {

    @ApiModelProperty("固定成本价")
    private String fixedCostPrice;

    @ApiModelProperty("可变成本价")
    private String volatileCostPrice;

    @ApiModelProperty("其它成本价")
    private String otherCostPrice;

    @ApiModelProperty("市场价")
    private Integer marketPrice;


    public void setFixedCostPrice(byte[] bytes) {
        this.fixedCostPrice = new String(bytes);
    }

    public void setVolatileCostPrice(byte[] bytes) {
        this.volatileCostPrice = new String(bytes);
    }

    public void setOtherCostPrice(byte[] bytes) {
        this.otherCostPrice = new String(bytes);
    }
}
